import { injectable, inject } from "inversify";
import { HomeInterface } from "./view/home";
import { MineInterface } from "./view/mine";
import { TYPES } from "./di/types"

export interface AppInterface {
    start: () => Promise<void>
}

@injectable()
export class App implements AppInterface {
    constructor(
        @inject(TYPES.Home) private home: HomeInterface,
        @inject(TYPES.Mine) private mine: MineInterface,
    ) {

    }
    public async start() {
        console.log("start init")
        await this.home.init();
        console.log("home init")
        await this.mine.init();
        console.log("mine init")
        console.log("app init end")
    }
}